/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/16
* File: RenderWindow.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef RenderWindow_h__
#define RenderWindow_h__

#include "../../RenderSystem/RenderTarget.h"

struct CreateWindowParams
{
	Dimension2Du	_window_dimension;
};


class RenderWindow : public RenderTarget
{
public:
	RenderWindow();
	~RenderWindow();

	virtual bool createWindow(const CreateWindowParams& param) = 0;

	const std::string& getName() const;
	void setName(const std::string& name);

	s32 getWidth() const;
	s32 getHeight() const;
	s32 getColorDepth() const;

	void setDimension(const Dimension2Du& dimension);

	u32 getWidnowID() const;

	virtual bool isWindowActive() const = 0;

	void addRenderTargetListener(RenderTargetListener* listener);

	void bind();
	void unbind();

protected:
	std::string					_caption;
	typedef						std::list<RenderTargetListener*> RenderTargetListeneList;
	RenderTargetListeneList		_render_target_listener_list;
	u32							_window_id;
	Dimension2Du				_dimension;
	s32							_depth_value;
};
#endif    /* RenderWindow_h__ */